home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / nutunes2.zip / TUNEDDOC.ASC < prev   
Text File  |  1992-07-24  |  4KB  |  86 lines

  1. Stupid OS/2 Tricks, Part One:
  2. Whistling a Differnt Tune
  3.  
  4. One of the neat things about OS 2 is the Tune Editor in the Productivity folder.  This lets you edit the supplied tunes (old folk songs) or create new tunes that you may find more to your liking.  I used it to create a new tune file called NewTunes that is currently making the rounds on bulletin boards.  In the course of this project, I learned some interesting things that you may be able to use.
  5.                                                                                                                                                  
  6. The tunes may have 20 notes, a range of about 3 chromatic octaves centered around middle C.  Note values range from 1/32nd to whole note, and rests from 1/32nd to whole rest.  Tempos range from a ridiculous 1 to 300 beats/minute.  Only one note at a time can be played (monophonic, no harmony) and most of the usual musical techniques such as dynamics, ties, second endings, and ritards are unsupported. 
  7.  
  8. The tune files are saved as [filename].$$A, and are plain ASCII text files, with each line terminated by a pipe (vertical bar).  They have no header, they just start with the title line of the first song (28 chars + pipe).  From there, each song also has a line that sets the tempo in Beats/Minute (4 chars + pipe), and one line for each of 20 notes.
  9.  
  10. If you like, you can edit a tune file with both the System Editor and Tune Editor at the same time.  This lets you make a change in one mode, save it, and observe the change in the other.  If you add notes to a song from the System Editor, only the first 20 will be played or saved in the System Editor.
  11.                                                                                                                                                        
  12. Here is  a table of the values used for pitches and time values.
  13.         Time Values
  14. 15     1st Note, 32nd rest
  15. 14     16th rest
  16. 13     8th rest
  17. 12     Quarter rest
  18. 11     Half rest
  19. 10     Whole rest
  20. 09     32nd note
  21. 08     16th note
  22. 07     Dotted 16th note
  23. 06     8th note
  24. 05     Dotted 8th note
  25. 04     Quarter note
  26. 03     Dotted quarter
  27. 02     Half note
  28. 01     Dotted half note
  29. 00     Whole Note                        
  30.  
  31.     Pitch Values
  32. 20    lowest A
  33. 62    lowest A#
  34. 19    lowest B
  35. 18    low C
  36. 60    low C#
  37. 17    low D
  38. 59    low D#
  39. 16    low E
  40. 15    low F
  41. 57    low F#
  42. 14    low G
  43. 56    low G#
  44. 13    low A
  45. 55    low A#
  46. 12    low B
  47. 11    middle C
  48. 53    C#
  49. 10    D
  50. 52    D#
  51. 09    E
  52. 08    F
  53. 50    F#
  54. 07    G
  55. 49    G#
  56. 06    A    
  57. 48    A#
  58. 05    B
  59. 04    high C
  60. 46    high C#
  61. 03    high D
  62. 45    high D#
  63. 02    high E
  64. 01    high F
  65. 43    high F#
  66. 00    high G    
  67.           
  68. Here's a sample tune to enter for yourself.  Open the tune editor, and you'll see the Default Tune 0.  Go into File/SaveAs and save as TuneTest.$$A then open the System Editor and edit \OS!2\Apps\TuneTest.$$A.  Make sure you're in overstrike mode, because line lengths must be exact; do this by pressing the Insert key and notice whether the cursor covers a character (overstrike) or forms a line between characters (insert).  Move down to 1: not in use and enter the codes shown below.  (In the following example, do not enter the comments to the right of the code; they are for your reference only.)
  69.  
  70. 1: Charge!                  |      (title)
  71. 0281|                                 (tempo)
  72. 04 07|                                (quarter note, G)
  73. 04 04|                               (quarter note, hi C)
  74. 04 02|
  75. 04 00|
  76. 12 06|
  77. 04 02|
  78. 00 00|
  79. 10 06|                               (whole rest, end of song)
  80. 10 06|                               (rest of tune already filled with whole rests)
  81. 10 06|                               (stop entering code)
  82. 10 06|                               (I mean it!)
  83.    .
  84.    .
  85.  
  86. Now save this file, then go back to Tune Editor and open it.  Choose File/Open Tune and select 1: Charge!, then Play the tune.  I hope you get some ideas!